<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>      

<div class="sub-content">
	<a href="${pageContext.request.contextPath}/company">Danh sách</a> 
	<c:url var="action" value="/company/confirm"></c:url>
	
	<form:form method="post" action="${action}" commandName="obj">	
		<h3><span class="mark-title"></span></h3>
		<div><form:errors path="*" cssClass="error" /></div>	
		<form:hidden path="companyId" cssClass="mark-id"/>
		<table>
			<tr>
				<td class="column1">Tên tổ chức hoặc cá nhân<span class="req-field"></span></td>
				<td><form:input path="companyName" cssClass="${companyName}"/></td>
			</tr>
			<tr>
				<td class="column1">Tên đầy đủ</td>
				<td><form:input path="companyFullName" /></td>
			</tr>			
			<tr>
				<td class="column1">Địa chỉ</td>
				<td><form:input path="companyAddress" /></td>
			</tr>	
			<tr>
				<td class="column1">Email<span class="req-field"></span></td>
				<td><form:input path="companyEmail" cssClass="${companyEmail}"/></td>
			</tr>
			<tr>
				<td class="column1">Điện thoại liên hệ<span class="req-field"></td>
				<td><form:input path="companyPhone" cssClass="${companyPhone}"/></td>
			</tr>
			<tr>
				<td class="column1">Fax</td>
				<td><form:input path="companyFax" /></td>
			</tr>			
			<tr>
				<td class="column1">Mã số thuế</td>
				<td><form:input path="companyTaxCode" /></td>
			</tr>	
			<tr>
				<td class="column1">Mô tả chi tiết kinh doanh</td>
				<td><form:input path="companyDes" /></td>
			</tr>
			<tr>
				<td class="column1">Thành phố:</td>
				<td><select name="cityId.cityId">
						<c:forEach items="${cities}" var="item">
							<c:choose>
								<c:when test="${company.cityId.cityId == item.cityId}">
									<option value="${item.cityId}" selected="selected">${item.cityName}</option>
								</c:when>
								<c:otherwise>
									<option value="${item.cityId}">${item.cityName}</option>
								</c:otherwise>
							</c:choose>						
						</c:forEach>
					</select>
				</td>
			</tr>	
			<tr>
				<td></td>
				<td><input type="submit" value="Lưu" /></td>
			</tr>
		</table>
	</form:form>
</div>	

